//Builder.java
package builder.simplified.mixDirectorAndBuilder;

/**
 *@author:youtubezou
 *@version:2012-7-15
 */
public class Builder {
	private Product product = new Product();
	
	private void buildPartOne(String name) {
		product.setName(name);
	}
	
	private void buildPartThree(int size) {
		product.setSize(size);
	}

	private void buildPartTwo(double price) {
		product.setPrice(price);
	}

	public void construct(String name, double price, int size) {
		buildPartOne(name);
		buildPartTwo(price);
		buildPartThree(size);
		System.out.println("Product has been constructed!");
	}

	public Product retrieveProdudct() {
		return product;
	}

}
